<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生管理主页</title>
    <link rel="stylesheet" href="/static/main.css">
    <script src="/static/jquery-1.12.4.min.js"></script>
    <script src="/static/student.js"></script>
</head>
<body>
<h1>学生管理</h1>
<h3><a href="/add_student/">添加学生</a></h3>
<h3 id="model_add_student_btn" style="background-color: cornflowerblue; width: 300px"> 模态对话框添加学生 </h3>
<table border="2" bgcolor="#faebd7">
    <thead>
        <tr>
            <th>学生ID</th>
            <th>学生姓名</th>
            <th>所在班级</th>
            <th colspan="2">新URL操作</th>
            <th colspan="2">模态对话框操作</th>
        </tr>
    </thead>
    <tbody>
        {% for student in student_list %}
            <tr>
                <th>{{ student.id }}</th>
                <th>{{ student.sname }}</th>
                <th>{{ student.cname }}</th>
                <th><a href="/edit_student/?sid={{ student.id }}">Edit</a></th>
                <th><a href="/del_student/?sid={{ student.id }}">Del</a></th>
                <th class="model_edit_student_btn" sid="{{ student.id }}"> Model_Edit </th>
                <th class="model_del_student_btn" sid="{{ student.id }}"> Model_Del </th>
            </tr>
        {% endfor %}
    </tbody>
</table>

<div id="stuShadow" class="hide"></div>

<div id="add_student_model" class="hide">
    <input type="text" id="sname">
    <p>所在班级
        <select id="class_id">

        </select>
    </p>
    <button id="add_student_btn">Submit</button>
    <button id="cancel_model_add_student_btn">Cancel</button>
</div>

<div id="edit_student_model" class="hide">
    <input type="text" id="edit_sname">
    <input type="hidden" id="edit_sid">
    <p>所在班级
        <select id="edit_class_id">

        </select>
    </p>
    <button id="edit_student_btn">Submit</button>
    <button id="cancel_model_edit_student_btn">Cancel</button>
</div>

</body>
</html>